import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025-02-14
 * Time: 00:01
 */
public class outPut {
    //输出一个整数的每一位，如：123的每一位是3，2，1
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int sum = in.nextInt();
        while (sum > 0){
            int num = sum % 10;
            sum = sum / 10;
            System.out.print(num+" ");
        }
    }
}
